<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<style>
.user-add{
	padding: 10px 0px 0px 75px;
	width: 275px;
}

.user-update{
	padding: 10px 0px 0px 75px;
	width: 275px;
}
</style>
<div id="userGrid"></div>
<div id="userToolbar">
	<div>
		<a href="#" class="easyui-linkbutton" onclick="user.toolbar.showAddDialog();" data-options="
		iconCls:'icon-add',
		plain:true">
			新增
		</a>
		<a href="#" class="easyui-linkbutton" onclick="user.toolbar.showUpdateDialog();" data-options="
		iconCls:'icon-edit',
		plain:true">
			修改
		</a>
		<a href="#" class="easyui-linkbutton" onclick="user.toolbar.replacement();" data-options="
		iconCls:'icon-reload',
		plain:true">
			重置用户密码
		</a>
		<a href="#" class="easyui-linkbutton" onclick="user.toolbar.updateState();" data-options="
		iconCls:'icon-edit',
		plain:true">
			修改权限
		</a>
		<a href="#" class="easyui-linkbutton" onclick="user.toolbar.redo();" data-options="
		iconCls:'icon-redo',
		plain:true">
			取消
		</a>
	</div>
	<div>
		<strong>姓名：</strong>
		<input type="text" id="userToolbar-name" name="userToolbar-name"/>
		<strong>班级：</strong>
		<input name="userToolbar-className" id="userToolbar-className">
		<!-- <strong>创建时间：</strong>
		<input type="text" id="userToolbar-time"  name="userToolbar-time" class="easyui-datetimebox"/> -->
		<a href="#" class="easyui-linkbutton" onclick="user.userGrid.datagrid();" data-options="
		iconCls:'icon-search',
		plain:true">
			查询
		</a>
	</div>
</div>


<div id="userAddDialog" class="easyui-dialog user-add" data-options="
title:'新增用户',
buttons:'#userAddButtons',
closed: true,
onClose:user.toolbar.resetAddFrom">
	<form id="userAddFrom" method="post">
		<p>
			<strong>帐号：</strong>
			<input type="text" name="code" id="code" class="easyui-textbox" data-options="
			required:true,
			validType:['minLength[2]','remote[\'<%=request.getContextPath() %>/SystemServlet?command=checkCodeSystem\', \'code\']'],
					invalidMessage: '该账号已存在'">
		</p>
		<p>
			<strong>密码：</strong>
			<input type="password" name="password" class="easyui-textbox" data-options="
			required:true,
			validType:'minLength[6]'">
		</p>
		<p>
			<strong>姓名：</strong>
			<input type="text" name="name" class="easyui-textbox" data-options="
			required:true,
			validType:'Length[1,20]'">
		</p>
		<p>
			<strong>性别：</strong>
			<select class="easyui-combobox" name="sex" id="sex">
			    <option value="1">男</option>
			    <option value="2">女</option>
			</select>
		</p>
		<p>
			<strong>电话：</strong>
			<input type="text" name="phone" class="easyui-textbox" data-options="
			required:true,
			validType:['mobile','remote[\'<%=request.getContextPath() %>/SystemServlet?command=checkPhoneSystem\', \'phone\']'],
					invalidMessage: '该电话非法或已存在'">
		</p>
		<p>
			<strong>邮箱：</strong>
			<input type="text" name="email" class="easyui-textbox" data-options="
			required:true,
			validType: ['email','remote[\'<%=request.getContextPath() %>/SystemServlet?command=checkEmailSystem\', \'email\']'],
					invalidMessage: '该邮箱非法或已存在'">
		</p>
		<p>
			<strong>所属角色：</strong>
			<select class="easyui-combobox" name="role__name" id="role__name">
			    <option value="管理员">管理员</option>
			    <option value="教师">教师</option>
			    <option value="学员">学员</option>
			</select>
		</p>
		<p>
			<strong>所属班级：</strong>
			<select class="easyui-combobox" name="class__name" id="class__name">
				<option value="">无</option>
			    <option value="云图1班">云图1班</option>
			    <option value="云图2班">云图2班</option>
			    <option value="云图3班">云图3班</option>
			    <option value="云图4班">云图4班</option>
			    <option value="云图5班">云图5班</option>
			    <option value="云图6班">云图6班</option>
			    <option value="云图7班">云图7班</option>
			    <option value="云图8班">云图8班</option>
			   	<option value="云图9班">云图9班</option>
			</select>
		</p>
		<p>
			<strong>备注：</strong>
			<textarea rows="1" cols="30" name="memo" id="memo" style="width:150px;" class="easyui-textbox"></textarea>
		</p>
	</form>
</div>
<div id="userAddButtons">
	<a href="#" onclick="user.toolbar.add()" class="easyui-linkbutton" data-options="
	iconCls: 'icon-add',
	plain: true">
		新增
	</a>
	<a href="#" onclick="user.toolbar.hiddenAddDialog();" class="easyui-linkbutton" data-options="
	iconCls: 'icon-redo',
	plain: true">
		取消
	</a>
</div>

<div id="userUpdateDialog" class="easyui-dialog user-update" data-options="
title:'修改',
buttons:'#userUpdateButtons',
closed: true,
onClose:user.toolbar.resetUpdateFrom">
	<form id="userUpdateForm" method="post">
		<input type="hidden" name="id"/>
		<p>
			<strong>电话：</strong>
			<input type="text" name="phone" class="easyui-textbox" data-options="
			required:true,
			validType:'mobile'">
		</p>
		<p>
			<strong>邮箱：</strong>
			<input type="text" name="email" class="easyui-textbox" data-options="
			required:true,
			validType: 'email'">
		</p>
		<p>
			<strong>所属班级：</strong>
			<select class="easyui-combobox" name="class__name" id="class__name">
				<option value="">无</option>
			    <option value="云图1班">云图1班</option>
			    <option value="云图2班">云图2班</option>
			    <option value="云图3班">云图3班</option>
			    <option value="云图4班">云图4班</option>
			    <option value="云图5班">云图5班</option>
			    <option value="云图6班">云图6班</option>
			    <option value="云图7班">云图7班</option>
			    <option value="云图8班">云图8班</option>
			   	<option value="云图9班">云图9班</option>
			</select>
		</p>
		
	</form>
</div>
<div id="userUpdateButtons">
	<a href="#" onclick="user.toolbar.update()" class="easyui-linkbutton" data-options="
	iconCls: 'icon-add',
	plain: true">
		修改
	</a>
	<a href="#" onclick="user.toolbar.hiddenUpdateDialog();" class="easyui-linkbutton" data-options="
	iconCls: 'icon-redo',
	plain: true">
		取消
	</a>
</div>
<script>
window.ctx = "<%=request.getContextPath() %>"
</script>
<script src="<%=request.getContextPath() %>/static/system/js/index.js"></script>
<script src="<%=request.getContextPath() %>/static/common/js/common.js"></script>
